/**
 * @file qrcode_scan.h
 *
 */
#ifndef QRCODE_SCAN_H
#define QRCODE_SCAN_H

#ifdef __cplusplus
extern "C" {
#endif

/*********************
 *      INCLUDES
 *********************/

#ifdef LV_CONF_INCLUDE_SIMPLE
#include "lvgl.h"
#include "lv_ex_conf.h"
#else
#include "../../../lvgl/lvgl.h"
#include "../../../lv_ex_conf.h"
#endif

#if USE_LV_WATCH_QRCODE_SCAN != 0
#ifndef BUILD_IN_PC_SIMULATOR
#if USE_LV_WATCH_THIRD_LIB_QRCODE_SCAN == 0
#include "../../../../product/craneg_modem/framework/hal/iot/qrcode/inc/qrcode_api.h"
#else
#include "../../../../external/third-party-libs/zbar/inc/qr_scan_api.h"
#endif
#else
#include "../../../../external/third-party-libs/zbar/inc/qr_scan_api.h"
#endif

/*********************
 *      DEFINES
 *********************/
#ifndef BUILD_IN_PC_SIMULATOR
#define QRCODE_FILE_SYSTEM_PATH  "D:\\qrcode.yuv"
#else
#define QRCODE_FILE_SYSTEM_PATH  "C:\\qrcode.yuv"
#endif
#define QRCODE_SCALE_TRY_COUNT 9
/**********************
 *      TYPEDEFS
 **********************/

/**********************
 * GLOBAL PROTOTYPES
 **********************/
void qrcode_scan_create_event_cb(lv_obj_t * btn, lv_event_t event);

/**********************
 *      MACROS
 **********************/

#endif /*USE_LV_WATCH_QRCODE_SCAN*/

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif /*QRCODE_SCAN_H*/
